<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<?php 
	$ci = & get_instance();
	$live_tournament_array = $ci->tournament_entity->getTournamentByStatus("upcoming");
?>
<div class="block" id="upcoming_tournament_div">	
	<div class="title"><span class="betticker" rel="div_upcoming_tournament">&nbsp;</span><h3 class="bold">Upcoming Tournament</h3></div>
	<div class="clrboth"></div>
	<div class="content" id="div_upcoming_tournament">
	<?php foreach($live_tournament_array as $item): ?>
		<?php $TOURNAMENT = $ci->tournament_entity->init('id', $item->id);?>
	
		<div class="rowitem">
			Time left <span class="yellow countdown lower" id="countdown_t_<?php echo $TOURNAMENT->getId();?>" rel="<?php echo ($TOURNAMENT->getStartTime() - time() );?>"></span> | 
			<span class="bold"><?php echo $TOURNAMENT->getName();?></span>
			<div class="clrboth"></div>
			<?php /*echo cutString($TOURNAMENT->getDescription(),howManyWordToCut());*/
				echo $TOURNAMENT->getDescription();
			?>
		</div>	
		<div class="clrboth"></div>
	<?php endforeach;?>	
	</div>
</div>